package com.yungu.swift.assets.driver.dao;

import com.yungu.swift.assets.driver.model.dto.CarModelValuationDto;
import com.yungu.swift.base.mapper.IMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 计费规则Mapper
 *
 * @author cuixiuyin - Generate
 * @version 1.1.1-SNAPSHOT
 * @since 2018-07-03 15:24
 */
public interface CarModelValuationMapper extends IMapper<CarModelValuationDto> {

    /**
     * 计费列表数据
     *
     * @param map Map
     * @return List<CarModelValuationDto>
     */
    List<CarModelValuationDto> listCarModel(Map<String, Object> map);


    /**
     * 获取默认的车型计费
     *
     * @param params Map
     * @return List<CarModelValuationDto>
     */
    List<CarModelValuationDto> listRule(Map<String, Object> params);

    /**
     * 查询单个计费实体
     *
     * @param uuid String
     * @return CarModelValuationDto
     */
    CarModelValuationDto findOne(@Param("uuid") String uuid);

    /**
     * listTypeTime
     *
     * @param map Map
     * @return List<CarModelValuationDto>
     */
    List<CarModelValuationDto> listTypeTime(Map<String, Object> map);

    /**
     * 删除开通城市时 需要伪删除对应的计价规则
     *
     * @param businessUuid String
     * @param cityUuid     String
     * @return int
     */
    int virtualDeleteModelsLevel(@Param("businessUuid") String businessUuid, @Param("cityUuid") String cityUuid);

    /**
     * 删除车型时 需要伪删除对应的计价规则
     *
     * @param carModelUuid String
     * @return int
     */
    int virtualDeleteModelsLevelByCarLevelUuid(@Param("carModelUuid") String carModelUuid);

    /**
     * 批量新增计价规则
     *
     * @param carModelValuationdtoList List<CarModelsLevelDto>
     * @return int
     */
    int addBatch(@Param("list") List<CarModelValuationDto> carModelValuationdtoList);
}